package com.skt.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.skt.domain.DTO.request.CreateRentalOrderRequest;
import com.skt.domain.PO.RentalOrder;
import com.skt.domain.VO.RentalOrderVO;

import javax.validation.Valid;
import java.util.List;

public interface RentalOrderService extends IService<RentalOrder> {

    /**
     * 创建租赁订单
     * @param request
     * @return
     */
    RentalOrderVO createRentalOrder(@Valid CreateRentalOrderRequest request);

    /**
     * 查询订单详情
     * @param id
     * @param currentUserId
     * @return
     */
    RentalOrderVO getOrderDetail(Long id, Long currentUserId);

    /**
     * 查询我的订单列表
     * @return
     */
    List<RentalOrderVO> listMyOrders(int pageNum, int pageSize);

    /**
     * 取消未生效的订单
     * @param id
     * @return
     */
    RentalOrderVO cancelPendingOrder(Long id);
}
